import http from '@/util/http.js'

/**
 * 查询用户有权限的菜单
 * @param params
 */
export function getUserMenus(params) {
  return http({
    url: '/kadmin/menu/get_user_menus',
    method: 'post',
    data: params
  })
}

/**
 * 查询所有菜单
 * @param params
 */
export function getMenuTree(params) {
  return http({
    url: '/kadmin/menu/get_menu_tree',
    method: 'post',
    data: params
  })
}

/**
 * 增加菜单
 * @param params
 */
export function add(params) {
  return http({
    url: '/kadmin/menu/add',
    method: 'post',
    data: params
  })
}

/**
 * 修改菜单
 * @param params
 */
export function modify(params) {
  return http({
    url: '/kadmin/menu/modify',
    method: 'post',
    data: params
  })
}

/**
 * 删除菜单
 * @param params
 */
export function deleteMenu(params) {
  return http({
    url: '/kadmin/menu/delete',
    method: 'post',
    data: params
  })
}

/**
 * 查询权限绑定的菜单
 * @param params
 */
export function getAutMenus(params) {
  return http({
    url: '/kadmin/menu/get_aut_menus',
    method: 'post',
    data: params
  })
}

